package com.yloveg.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yloveg.base.BaseController;
import com.yloveg.common.PageUtil;
import com.yloveg.entity.ShopOrders;
import com.yloveg.service.ShopOrdersService;

@Controller
@RequestMapping({"order"})
public class OrderController extends BaseController {  
	
    @Autowired
    private ShopOrdersService shopOrdersService;

    @RequestMapping({"orderList"})  
    public String orderList(ModelMap map){
        return "landing/order/orderList";
    }
    @RequestMapping("/queryorderPage")
    @ResponseBody
    public Map<String, Object> queryorderPage(int page, int limit,ShopOrders order){
        Map<String, Object> map = PageUtil.dateToLayTable(shopOrdersService.queryOrdersPage(page,limit,order));
        return map;
    }
	
	

}
